package cn.stylefeng.guns.modular.gridsystem.activemq;

import cn.stylefeng.guns.modular.gridsystem.config.ActiveMqConf;
import cn.stylefeng.guns.modular.gridsystem.model.param.BizUploadQueueLogParam;
import cn.stylefeng.guns.modular.gridsystem.model.param.ThirdIntegerfaceParam;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * @author ssy
 * @date 2021/8/9 14:39
 */
@Service
public class ActiveMqProduce implements ActiveMqProduceService {

    @Resource
    private JmsMessagingTemplate jmsTemplate;

    @Override
    public void sendMsg(String msg){
        jmsTemplate.convertAndSend(ActiveMqConf.myQueue, msg);
    }

    @Override
    public void sendT(BizUploadQueueLogParam bizUploadQueueLogParam){
        jmsTemplate.convertAndSend(ActiveMqConf.myQueue,bizUploadQueueLogParam);
    }

    @Override
    public void sendThirdParty(ThirdIntegerfaceParam thirdIntegerfaceParam){
        jmsTemplate.convertAndSend(ActiveMqConf.thirdQueue,thirdIntegerfaceParam);
    }

}
